package com.planet.stockanalysis.server.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.planet.stockanalysis.server.entity.User;

public interface UserDao  extends CrudRepository<User, Long>, JpaSpecificationExecutor<User> { 
	public User findByUsername(String username);

	@Query("select u from User u where u.username = ? and u.password = ?")
	public List<User> findByNameAndPassword(String username, String password);
}